/* eslint-disable max-classes-per-file */
import { JsonProperty, Serializable } from '@/plugins/reflect-metadata';

@Serializable()
export class TransNameQuery {
  @JsonProperty('cardProductName')
    cardProductName: string = '';

  @JsonProperty('platformType')
    platformType: string = 'xunka';

  get body() {
    return {
      cardProductName: this.cardProductName,
      platformType: this.platformType,
    };
  }

  get all() {
    return {
      platformType: this.platformType,
    };
  }
}

@Serializable()
export class TransNameItem {
  @JsonProperty('cardProductName')
    cardProductName: string = '';

  @JsonProperty('cardProductId')
    cardProductId: number = 0;
}

@Serializable()
export class TransNameList {
  @JsonProperty({ name: 'data', type: TransNameItem })
    items: TransNameItem[] = [];

  get total() {
    return this.items.length;
  }
}

@Serializable()
export class TransFaceValueQuery {
  @JsonProperty('cardProductName')
    cardProductName: string = '';

  @JsonProperty('cardProductId')
    cardProductId: number = 0;

  get body() {
    return {
      cardProductId: this.cardProductId,
    };
  }
}

@Serializable()
export class TransFaceValueItem {
  @JsonProperty('faceValue')
    faceValue: number = 0;

  @JsonProperty('cardProductSkuId')
    cardProductSkuId: number = 0;
}

@Serializable()
export class TransFaceValueList {
  @JsonProperty({ name: 'data', type: TransFaceValueItem })
    items: TransFaceValueItem[] = [];

  get total() {
    return this.items.length;
  }
}
